package com.hl.ruoyilkshop.domain.vo;

import java.util.List;
import java.util.ArrayList;

/**
 * 商品分类树形结构VO
 * 
 * @author ruoyi
 * @date 2025-08-07
 */
public class GoodsClassTreeVO
{
    /** 商品分类ID */
    private Long id;

    /** 商品分类名称 */
    private String name;

    /** 父分类ID */
    private Long parentId;

    /** 分类等级 */
    private Long level;

    /** 商品类型:1-实物商品,2-虚拟商品 */
    private Long goodsType;

    /** 分类图片 */
    private String img;

    /** 子分类列表 */
    private List<GoodsClassTreeVO> children;

    public GoodsClassTreeVO() {
        this.children = new ArrayList<>();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getLevel() {
        return level;
    }

    public void setLevel(Long level) {
        this.level = level;
    }

    public Long getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(Long goodsType) {
        this.goodsType = goodsType;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public List<GoodsClassTreeVO> getChildren() {
        return children;
    }

    public void setChildren(List<GoodsClassTreeVO> children) {
        this.children = children;
    }

    /**
     * 添加子分类
     */
    public void addChild(GoodsClassTreeVO child) {
        this.children.add(child);
    }
} 